<template>
  <!-- 主页面不需要修改 -->
  <div>
    <navbar />
    <headers />
    <div class="navinfo">
      <router-link
        v-for="item in list"
        :key="item.id"
        class="navs"
        :to="item.path"
      >{{ item.title }}</router-link>
    </div>
    <!-- 子路由占位 -->
    <router-view></router-view>
  </div>
</template>

<script>
import Navbar from "../components/Navbar.vue";
import Headers from "../components/Header.vue";
export default {
  components: {
    Headers,
    Navbar,
  },
  data() {
    return {
      show: false,
      list: [
        {
          path: '/recommend',
          id: 1,
          title: '推荐音乐'
        },
        {
          path: '/hot',
          id: 2,
          title: '热歌榜'
        },
        {
          path: '/search',
          id: 3,
          title: '热门搜索'
        }
      ]
    };
  },
  methods: {
    showPopup() {
      this.show = true;
    },
  }
}
</script>
<style lang="less">
.navinfo {
  display: flex;
  justify-content: space-around;
}
.navs {
  width: 20%;
  height: 40px;
  text-align: center;
  line-height: 50px;
  color: black;
}
.router-link-active {
  color: red;
  border-bottom: 4px red solid;
}
// 评论
.van-tabs__content {
  display: inline-block;
  .van-cell {
    padding: 2px;
  }
  .van-tabs__track {
    flex-direction: column;
  }
  .van-cell__right-icon {
    display: none;
  }
  .van-icon-more-o {
    font-size: 24px;
  }
}
</style>
